package com.light.gulimall.ware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.light.common.utils.PageUtils;
import com.light.common.utils.R;
import com.light.gulimall.ware.dto.PurchaseDoneDTO;
import com.light.gulimall.ware.dto.PurchaseMergeDTO;
import com.light.gulimall.ware.entity.PurchaseEntity;

import java.util.List;
import java.util.Map;

/**
 * 采购信息
 *
 * @author minmin
 * @email 980680541@gmail.com
 * @date 2024-07-16 21:32:14
 */
public interface PurchaseService extends IService<PurchaseEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 查询未领取的采购单
     * @return  分页查询结果
     */
    PageUtils getUnreceiveList(Map<String, Object> params);

    /**
     * 合并采购需求
     * @param dto 前端传递参数
     * @return  是否成功
     */
    R merge(PurchaseMergeDTO dto);

    /**
     * 领取采购单
     * @param ids 前端传递参数
     * @return 是否成功
     */
    R receive(List<Long> ids);

    /**
     * 完成采购
     * @param dto 前端传递
     * @return  是否成功
     */
    R receiveDone(PurchaseDoneDTO dto);
}

